﻿@inherits NFinal.View.RazorView<ModelData>
@using NFinalCompiler.SqlModel;
@using System.Linq;
using @(Model.ModelNameSpace).Base.BaseDAL;
namespace  @(Model.ModelNameSpace).ModelFiter.@Model.DataBaseShortName
{
    /// <summary>
    /// @(Model.Table.Description)DAL
    ///</summary>
    public class @ModelHelper.GetTableName(Model.Table)Dal : BaseDAL
    {
        public @ModelHelper.GetTableName(Model.Table)Dal()
        {
            _Field = "@ModelHelper.GetCol(Model.Table)";
            _Primary = "@(Model.Table.PrimaryKey==null?null:Model.Table.PrimaryKey.Columns.First())";
            _FieldAt = "@ModelHelper.GetColp(Model.Table)";
            _Table = "@Model.Table.Name";
            _FieldUp = "@ModelHelper.GetColu(Model.Table)";
            _IsIdentity = @Model.Table.HasAutoNumberColumn;//主建是否自增，如果不自增插入的时候要赋值
            _DataBase= "@Model.DataBaseShortName";
        }
    }
}